
(require (quote scheme))

(require (quote shell))

(defvar inferior-scheme-mode-map nil)

(if inferior-scheme-mode-map nil (setq inferior-scheme-mode-map (copy-alist shell-mode-map)) (define-key inferior-scheme-mode-map "" (quote quit-shell-subjob)) (define-key inferior-scheme-mode-map "" (quote interrupt-shell-subjob)) (define-key inferior-scheme-mode-map "" (quote interrupt-shell-subjob)) (scheme-mode-commands inferior-scheme-mode-map))

(defun inferior-scheme-mode nil "\
Major mode for interacting with an inferior Scheme process.

The following commands are available:
\\{inferior-scheme-mode-map}

Entry to this mode calls the value of scheme-mode-hook with no arguments,
if that value is non-nil.  Likewise with the value of shell-mode-hook.
scheme-mode-hook is called after shell-mode-hook.

You can send text to the inferior Scheme from other buffers
using the commands send-region, send-string and \\[scheme-send-definition].

Commands:
Delete converts tabs to spaces as it moves back.
Tab indents for Scheme; with argument, shifts rest
 of expression rigidly with the current line.
Meta-Control-Q does Tab on each line starting within following expression.
Paragraphs are separated only by blank lines.  Semicolons start comments.

Return at end of buffer sends line as input.
Return not at end copies rest of line to end and sends it.
C-d at end of buffer sends end-of-file as input.
C-d not at end or with arg deletes or kills characters.
C-u and C-w are kill commands, imitating normal Unix input editing.
C-c interrupts the shell or its current subjob if any.
C-z stops, likewise.  C-\\ sends quit signal, likewise.

C-x C-k deletes last batch of output from shell.
C-x C-v puts top of last batch of output at top of window." (interactive) (byte-code "ƈ� �ȉ�ɉ�ʉ�� ��!���!�� ����!�� �����\"�" [major-mode mode-name mode-line-process inferior-scheme-mode-map last-input-start last-input-end nil kill-all-local-variables inferior-scheme-mode "Inferior Scheme" (": %s") scheme-mode-variables use-local-map make-local-variable make-marker run-hooks shell-mode-hook scheme-mode-hook] 10))

(defun args-to-list (string) (byte-code "��	\"?� 	C�A �U?�' 	�O�	�\\	GO!B�A A ��	\"?�9 Ă@ �		GO!))�" [where string t pos nil string-match "[ 	]" 0 args-to-list 1 "[^ 	]"] 7))

(defvar scheme-program-name "scheme" "\
Program invoked by the scheme and run-scheme commands")

(defun scheme (arg) "\
Run an inferior Scheme process reading a command line from the terminal." (interactive "sExtra arguments to scheme: ") (byte-code "���������
!�\"%!�� �" [scheme-program-name nil arg switch-to-buffer apply make-shell "scheme" append args-to-list ("-emacs") inferior-scheme-mode] 10))

(defun run-scheme (arg) "\
Run an inferior Scheme process.
Input and output via buffer *scheme*.
With argument it asks for a command line." (interactive "P") (byte-code "� ��!� ���	��$!�� �" [arg scheme-program-name nil call-interactively scheme switch-to-buffer make-shell "scheme" "-emacs" inferior-scheme-mode] 7))

(defun scheme-send-definition nil "\
Send the current definition to the Scheme process made by M-x run-scheme." (interactive) (byte-code "���� �`� ���`#����\"))�" [end nil end-of-defun beginning-of-defun send-region "scheme" send-string "
"] 6))

(defun scheme-send-definition-and-go nil "\
Send the current definition to the inferior Scheme, and switch to *scheme* buffer." (interactive) (byte-code "��� ���!�" [nil scheme-send-definition switch-to-buffer "*scheme*"] 3))
